package me.dqn.eurekaclient.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author dqn
 * created at 2018/11/8 - 15:48
 */
@RestController
public class MainController {
    @Value("${server.port}")
    String port;

    @GetMapping("/hello")
    public String hello(@RequestParam("name") String name) {
        return "Hello! " + name + "[ from client port:" + port + " ],";
    }
    @GetMapping("/hi")
    public String hi(@RequestParam("name") String name) {
        return "Hi! " + name + "[ from client port:" + port + " ],";
    }
}
